home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / sys / RCS / syslog.h,v < prev    next >
Text File  |  1989-07-14  |  3KB  |  136 lines

  1. head     1.3;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.3
  10. date     89.07.14.09.15.32;  author rab;  state Exp;
  11. branches ;
  12. next     1.2;
  13.  
  14. 1.2
  15. date     88.06.29.14.48.16;  author ouster;  state Exp;
  16. branches ;
  17. next     1.1;
  18.  
  19. 1.1
  20. date     88.06.21.16.12.55;  author ouster;  state Exp;
  21. branches ;
  22. next     ;
  23.  
  24.  
  25. desc
  26. @@
  27.  
  28.  
  29. 1.3
  30. log
  31. @*** empty log message ***
  32. @
  33. text
  34. @/*
  35.  * Copyright (c) 1982, 1986 Regents of the University of California.
  36.  * All rights reserved.  The Berkeley software License Agreement
  37.  * specifies the terms and conditions for redistribution.
  38.  *
  39.  *    @@(#)syslog.h    7.8 (Berkeley) 5/26/88
  40.  */
  41.  
  42. #ifndef _SYSLOG
  43. #define _SYSLOG
  44.  
  45. /*
  46.  *  Facility codes
  47.  */
  48.  
  49. #define LOG_KERN    (0<<3)    /* kernel messages */
  50. #define LOG_USER    (1<<3)    /* random user-level messages */
  51. #define LOG_MAIL    (2<<3)    /* mail system */
  52. #define LOG_DAEMON    (3<<3)    /* system daemons */
  53. #define LOG_AUTH    (4<<3)    /* security/authorization messages */
  54. #define LOG_SYSLOG    (5<<3)    /* messages generated internally by syslogd */
  55. #define LOG_LPR        (6<<3)    /* line printer subsystem */
  56. #define LOG_NEWS    (7<<3)    /* network news subsystem */
  57. #define LOG_UUCP    (8<<3)    /* UUCP subsystem */
  58.     /* other codes through 15 reserved for system use */
  59. #define LOG_LOCAL0    (16<<3)    /* reserved for local use */
  60. #define LOG_LOCAL1    (17<<3)    /* reserved for local use */
  61. #define LOG_LOCAL2    (18<<3)    /* reserved for local use */
  62. #define LOG_LOCAL3    (19<<3)    /* reserved for local use */
  63. #define LOG_LOCAL4    (20<<3)    /* reserved for local use */
  64. #define LOG_LOCAL5    (21<<3)    /* reserved for local use */
  65. #define LOG_LOCAL6    (22<<3)    /* reserved for local use */
  66. #define LOG_LOCAL7    (23<<3)    /* reserved for local use */
  67.  
  68. #define LOG_NFACILITIES    24    /* maximum number of facilities */
  69. #define LOG_FACMASK    0x03f8    /* mask to extract facility part */
  70.  
  71. #define LOG_FAC(p)    (((p) & LOG_FACMASK) >> 3)    /* facility of pri */
  72.  
  73. /*
  74.  *  Priorities (these are ordered)
  75.  */
  76.  
  77. #define LOG_EMERG    0    /* system is unusable */
  78. #define LOG_ALERT    1    /* action must be taken immediately */
  79. #define LOG_CRIT    2    /* critical conditions */
  80. #define LOG_ERR        3    /* error conditions */
  81. #define LOG_WARNING    4    /* warning conditions */
  82. #define LOG_NOTICE    5    /* normal but signification condition */
  83. #define LOG_INFO    6    /* informational */
  84. #define LOG_DEBUG    7    /* debug-level messages */
  85.  
  86. #define LOG_PRIMASK    0x0007    /* mask to extract priority part (internal) */
  87. #define LOG_PRI(p)    ((p) & LOG_PRIMASK)    /* extract priority */
  88.  
  89. #define    LOG_MAKEPRI(fac, pri)    (((fac) << 3) | (pri))
  90.  
  91. #ifdef KERNEL
  92. #define LOG_PRINTF    -1    /* pseudo-priority to indicate use of printf */
  93. #endif
  94.  
  95. /*
  96.  * arguments to setlogmask.
  97.  */
  98. #define    LOG_MASK(pri)    (1 << (pri))        /* mask for one priority */
  99. #define    LOG_UPTO(pri)    ((1 << ((pri)+1)) - 1)    /* all priorities through pri */
  100.  
  101. /*
  102.  *  Option flags for openlog.
  103.  *
  104.  *    LOG_ODELAY no longer does anything; LOG_NDELAY is the
  105.  *    inverse of what it used to be.
  106.  */
  107. #define    LOG_PID        0x01    /* log the pid with each message */
  108. #define    LOG_CONS    0x02    /* log on the console if errors in sending */
  109. #define    LOG_ODELAY    0x04    /* delay open until first syslog() (default) */
  110. #define LOG_NDELAY    0x08    /* don't delay open */
  111. #define LOG_NOWAIT    0x10    /* if forking to log on console, don't wait() */
  112.  
  113. #endif /* _SYSLOG */
  114. @
  115.  
  116.  
  117. 1.2
  118. log
  119. @Add ifdefs to prevent files from being included multiple times.
  120. @
  121. text
  122. @d80 1
  123. a80 1
  124. #endif _SYSLOG
  125. @
  126.  
  127.  
  128. 1.1
  129. log
  130. @Initial revision
  131. @
  132. text
  133. @d9 3
  134. d79 2
  135. @
  136.